package com.smh;

/**
 * @author shiminghui
 * @date 2024/10/17 20:55
 * @description: TODO
 */
public enum MyEnum implements Info { //继承Enum类,一般不重写toString方法, 枚举类默认有toString方法,打印枚举名(相当于自定义枚举类的对象名)
    SPRING("spring", "春天") {
        @Override
        public void show() {
            System.out.println("MyEnum");
        }
    },
    SUMMER("summer", "夏天") {
        public void show() {
            System.out.println("MyEnum");
        }
    },
    AUTUMN("autumn", "秋天") {
        public void show() {
            System.out.println("MyEnum");
        }
    },
    WINTER("winter", "冬天") {
        public void show() {
            System.out.println("MyEnum");
        }
    };
    private String description;
    private String season;

    MyEnum(String season, String description) {
        this.description = description;
        this.season = season;
    }

    public String getDescription() {
        return description;
    }

    public String getSeason() {
        return season;
    }

//    @Override
//    public void show() {
//        System.out.println("MyEnum");
//    }
}
